package com.hgw.Demo01_ChainOfResponsibilityPattern.examples;

/**
 * Data time:2021/12/16 12:41
 * StudentID:2019112118
 * Author:hgw
 * Description: 审批者类，充当抽象处理者
 */
public abstract class Approver {
    protected Approver successor;   // 定义后继对象
    protected String name;          // 审批者姓名

    public Approver(String name) {
        this.name = name;
    }

    // 设置后继者
    public void setSuccessor(Approver successor) {
        this.successor = successor;
    }

    // 抽象请求处理方法
    public abstract void processRequest(PurchaseRequest request);
}
